package com.uniriho.lxr0811_7300_bl.base

import android.app.Application
import android.content.Context
import android.widget.Toast

class BaseApplication: Application() {

    override fun onCreate() {
        super.onCreate()
        sToast =Toast.makeText(this,"",Toast.LENGTH_SHORT)
        context = this
    }

    companion object {
        private var sToast: Toast? = null
        private var context:Context? = null
        fun toast(txt: String, duration: Int) {
            sToast!!.setText(txt)
            sToast!!.setDuration(duration)
            sToast!!.show()
        }

        fun getContext(): Context? {
            return context
        }
    }
}